import request from '@/utils/request'

const api_name = '/schedule'

export default {
    getById(id) {
        return request({
            url: `${api_name}/getById?id=${id}`,
            method: 'get'
        })
    },
    selectPage(current, limit, selectCourseVo) {
        return request({
            url: `${api_name}/selectPage?current=${current}&limit=${limit}`,
            method: 'post',
            data: selectCourseVo  //使用json
        })
    },
    add(schedule) {
        return request({
            url: `${api_name}/add`,
            method: 'post',
            data: schedule
        })
    },
    //修改课程设置
    updateById(schedule) {
        return request({
            url: `${api_name}/updateById`,
            method: 'put',
            data: schedule
        })
    },
    //批量删除
    removeByIds(idList) {
        return request({
            url: `${api_name}/removeByIds`,
            method: 'delete',
            data: idList
        })
    }
}
